package com.happle.gcmclient.backendmanager.task;

import android.os.AsyncTask;

import com.happle.gcmclient.backendmanager.BackendManager;
import com.happle.gcmclient.config.Constants;
import com.happle.gcmclient.obj.ConversationObj;
import com.happle.gcmclient.obj.LngObj;

import org.apache.http.util.LangUtils;

/**
 * Created by Inna on 19.02.14.
 */
public class UpdateLanguageTask extends AsyncTask<Void, Void, Integer> {
    private LngObj lngObj = new LngObj();
    private String regId = "";

    public UpdateLanguageTask (LngObj languageObj, String registration_id) {
        lngObj = languageObj;
        regId = registration_id;
    }
    @Override
    protected Integer doInBackground(Void... params) {
        int result  = Constants.FAILED;
        try {
            BackendManager bManager = new BackendManager();
            result = bManager.updateLanguage(lngObj, regId);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }
}
